import { createRouter, createWebHistory  } from 'vue-router';
import type { RouteRecordRaw } from 'vue-router';
// 导入 Home 组件
import Home from '@/views/Home.vue'; 
import Channel from '@/views/Channel.vue'; 
import Profile from '@/views/My.vue'; 
import VideoPlayer from '@/views/VideoPlayer.vue'; // 假设视频播放组件路径

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/channel',
    name: 'Channel',
    component: Channel
  },
  {
    path: '/profile',
    name: 'Profile',
    component: Profile
  },
  {
    path: '/video/:id', // 假设使用 id 来标识不同视频
    name: 'VideoPlayer',
    component: VideoPlayer
  }
];

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
});

export default router;